package com.ch.web.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ch.web.ResponseDto.xyDz.XyUserEntityDzTalkRes;
import com.ch.web.entity.user.XyUserEntity;
import com.ch.web.requestDto.xyUser.UserLoginFormDto;
import com.ch.web.utils.PageUtils;
import com.ch.web.utils.R;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 *
 *
 * @author chenHao
 * @email 1429542285@qq.com
 * @date 2022-04-27 22:59:18
 */
public interface XyUserService extends IService<XyUserEntity> {

    PageUtils queryPage(Map<String, Object> params);

    R checkLogin(UserLoginFormDto userLoginFormDto) throws Exception;

    R checkExistsUserName(String username);

    /**
     * 当这个账号下线的时候 修改状态
     * @param userName
     */
    void logout(String userName);

    List<XyUserEntityDzTalkRes> getDZPersons(Long talkId);

    Long geUserIdByUserNick(String userNick);

    String getAvaByName(String username);

    boolean editUserInfo(XyUserEntity xyUserEntity, HttpServletRequest request);

    boolean checkPassword(String oldPassword, HttpServletRequest request);

    void updatePassword(String newPassword, HttpServletRequest request);


}

